using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace ProjectManageSystemApi.DbEntity {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "building_site_bill", DisableSyncStructure = true)]
	public partial class BuildingSiteBill {

		[JsonProperty, Column(Name = "id", DbType = "int unsigned", IsPrimary = true, IsIdentity = true)]
		public uint Id { get; set; }

		[JsonProperty, Column(Name = "bill_no")]
		public string BillNo { get; set; }

		[JsonProperty, Column(Name = "project_id")]
		public int ProjectId { get; set; }

		[JsonProperty, Column(Name = "name")]
		public string Name { get; set; }

		[JsonProperty, Column(Name = "quantity", DbType = "decimal(10, 4)")]
		public decimal Quantity { get; set; }

		[JsonProperty, Column(Name = "unit")]
		public string Unit { get; set; }

		[JsonProperty, Column(Name = "unit_price", DbType = "decimal(10, 2)")]
		public decimal UnitPrice { get; set; }

		[JsonProperty, Column(Name = "bill_desc")]
		public string BillDesc { get; set; }

		[JsonProperty, Column(Name = "create_time", DbType = "datetime")]
		public DateTime CreateTime { get; set; }

		[JsonProperty, Column(Name = "create_user", DbType = "bigint")]
		public long CreateUser { get; set; }

		[JsonProperty, Column(Name = "status")]
		public byte Status { get; set; }

		[JsonProperty, Column(Name = "return_time", DbType = "datetime")]
		public DateTime? ReturnTime { get; set; }

		[JsonProperty, Column(Name = "return_user", DbType = "bigint")]
		public long? ReturnUser { get; set; }

		[JsonProperty, Column(Name = "return_desc")]
		public string ReturnDesc { get; set; }

		[JsonProperty, Column(Name = "confirm_time", DbType = "datetime")]
		public DateTime? ConfirmTime { get; set; }

		[JsonProperty, Column(Name = "confirm_user", DbType = "bigint")]
		public long? ConfirmUser { get; set; }


		[Navigate(nameof(CreateUser))]
		public UserInfo CreateUserInfo { get; set; }

		[Navigate(nameof(ReturnUser))]
		public UserInfo ReturnUserInfo { get; set; }

		[Navigate(nameof(ConfirmUser))]
		public UserInfo ConfirmUserInfo { get; set; }

		[Navigate(nameof(ProjectId))]
		public ProjectInfo ProjectInfo { get; set; }

		[Navigate(nameof(BuildingSiteBillImages.BuildingSiteBillId))]
		public List<BuildingSiteBillImages> Images { get; set; }
	}

}
